<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>密码修改</title>
<import type="css" file="css.form" />
<import type="css" file="css.global" />
<import type="js" file="js.jquery" />
<import type="js" file="js.jquery#passwordStrength" />
<script Language="JavaScript">
$(document).ready(function(){
	var $pwd = $('input[name="new_password"]');					   
	$pwd.passwordStrength();
	$(".Generate_password").click(function(){	
	//产生随机八位密码
	var pwd = $.passwordStrength.getRandomPassword(8);
	//将随机密码写入密码框，并触发验证
	$pwd.val(pwd).trigger("keyup");
	return false;
	})
});
function CheckForm()
{
 if(document.form1.new_password.value=="")
 { alert("密码不能为空！");
	 return (false);
 }
 if(document.form1.new_password.value != document.form1.confirma_password.value)
 { alert("密码和确认密码不相同！");
	 return (false);
 }
}
</script>
<style type="text/css">
#passwordStrengthDiv{width:150px;float:left;margin-top:6px;}
.is0{background:url(__PUBLIC__/images/progressImg.png) no-repeat 0 0;width:138px;height:7px;}
.is10{background-position:0 -7px;}
.is20{background-position:0 -14px;}
.is30{background-position:0 -21px;}
.is40{background-position:0 -28px;}
.is50{background-position:0 -35px;}
.is60{background-position:0 -42px;}
.is70{background-position:0 -49px;}
.is80{background-position:0 -56px;}
.is90{background-position:0 -63px;}
.is100{background-position:0 -70px;}
</style>
</head>
<body>
<div class="search"><b>修改用户密码</b></div>
<div id="form">
	<form method="post" action="__URL__/password_save" name="form1" onsubmit="return CheckForm();" >
		<table>
			<tr class="Big">
				<td class="titlename"><b>姓名：</b></td>
				<td><b>{$name}</b></td>
			</tr>
			<tr>
				<td class="titlename">原密码：</td>
				<td><input type="password" name="password" size="15" maxlength="20" ></td>
			</tr>
			
			<tr>
				<td class="titlename">新密码：</td>
				<td>
				  <div><input type="password" name="new_password" size="15" maxlength="20" ></div> <div id="passwordStrengthDiv" class="is0"></div> </td>
			</tr>
			
			<tr>
				<td class="titlename">确认新密码：</td>
				<td>
				  <input type="password" name="confirma_password" size="15" maxlength="20" >
				</td>
			</tr>
			
			<tr>
				<td></td>
			    <td>
			      <input type="submit" value="保存" class='submit'>
			    </td>
			</tr>
		</table>
	</form>
</div>
</body>
</html>